package bg.cinema_system.utils;

import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class MathOperations {

	public static Set<Integer> getMerged(List<Integer> a, List<Integer> b) {
		Set<Integer> c = new HashSet<Integer>();

		c.addAll(a);
		c.addAll(b);

		return c;
	}

	public static Date addMinutes(Date date, int minToAdd) {
		
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		cal.add(Calendar.MINUTE, minToAdd);
		
		Date result = cal.getTime(); 
		
		return result;
	}
}
